package com.star.sso.repository.model;

import com.star.common.core.contract.BaseRepository;
import com.star.common.core.contract.Model;
import com.star.sso.repository.service.SysUserRepository;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDateTime;

/**
 * 用户表(SysUser)领域类
 *
 * @author zhouhengzhe
 * @since 2024-01-08 23:53:43
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
public class SysUserBO extends Model {

    @Schema(description = "用户ID")
    private String id;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    @Schema(description = "创建人编码")
    private String createBy;
    @Schema(description = "创建人")
    private String creator;
    @Schema(description = "更新人编码")
    private String updateBy;
    @Schema(description = "更新人")
    private String updater;
    @Schema(description = "用户名")
    private String username;
    private String password;
    @Schema(description = "随机盐")
    private String salt;
    /**
     * @see com.star.common.core.contract.enums.StatusEnum
     */
    @Schema(description = "用户状态,0:禁用,1:正常")
    private Integer status;
    @Schema(description = "用户手机号")
    private Integer mobile;
    @Schema(description = "用户邮箱")
    private String email;
    @Schema(description = "岗位ID")
    private String positionId;
    @Schema(description = "用户所属部门id")
    private String deptId;

    public static SysUserRepository repository() {
        return BaseRepository.of(SysUserBO.class);
    }
}
